package com.jsnkj.basic

import com.jsnkj.basic.bean.AdSettingListBean
import com.jsnkj.basic.bean.AdTypeBean

object LibraryConfig {

    var DEBUG = true
    var HTTP_URL = ""
    var UMENG_APP_AD_KEY = ""
    var WX_APP_ID = "wxf6afeb2e16fd896f"
    var APP_CHANNEL_NAME = ""
    var APPLICATION_ID = ""
    var VERSION_CODE = 1
    var HIDDEN_HOME = "0" //是否隐藏首页  0：隐藏 1：不隐藏

    var ENABLE_OFFLINE_AD = "0" //是否启动离线广告数据  0：启用 1：不启用

    var ENABLE_BECOME_COLONEL = "0"   //是否启用成为团长功能  0：启用 1：不启用

    var ENABLE_LOGIN_TYPE = "0"   //是否切换登录功能  0：微信登录 1：一键登录-阿里支付

    var ENABLE_PAY_TYPE = "0"      //支付功能   0：微信登录  1：支付宝支付

    public fun isHiddenHomeFragment(): Boolean {
        return "0" == HIDDEN_HOME
    }

    public fun isEnableOfflineAd(): Boolean {
        return "0" == ENABLE_OFFLINE_AD
    }

    public fun isEnableBecomeColonel(): Boolean {
        return "0" == ENABLE_BECOME_COLONEL
    }

    public fun isEnableLoginType(): Boolean {
        return "0" == ENABLE_LOGIN_TYPE
    }
    public fun isEnablePayType(): Boolean {
        return "0" == ENABLE_PAY_TYPE
    }


    fun addOfflineAD(
        id: Int,
        adId: String,
        rewardRate: String,
        position: String,
        name: String
    ): AdSettingListBean {
        val adSettingListBean = AdSettingListBean()

        val adTypeBean = AdTypeBean()
        adTypeBean.id = id
        adTypeBean.name = name
        adTypeBean.position = position
        adTypeBean.status = "enabled"
        adTypeBean.reward_rate = rewardRate


        adSettingListBean.id = id
        adSettingListBean.adtype_id = id
        adSettingListBean.value = adId
        adSettingListBean.status = "enabled"
        adSettingListBean.reward_rate = rewardRate
        adSettingListBean.position = position
        adSettingListBean.adtype = adTypeBean

        return adSettingListBean
    }


}









